The executable package you create with xSQL Builder contains the code to capture, save, report and handle errors that might occur when it runs on the client machine. The following rules apply to error handling:
- If an error occurs during the package execution, the error is logged and the entire process stops. An email notification is sent to the designated email account when either "Send on Failure" or "Send on Completion" email notification has been configured. The error log file is appended to the email notification by default.
- When a step fails, only that step is rolled back. T-SQL scripts, for example, that run after the synchronization, are treated as one step. If one of the scripts fails, the entire set of post-sync scripts is rolled back. All the steps that have completed successfully prior to the failing step are committed to the database.
- In the package fails, it returns a specific error code that indicates the type of error. You can inspect all the error codes in the builder code template project.
For a full list of error codes, check Appendix B.